package day11;
import java.io.*;
public class learn3 {
    public static void main(String[] args) throws IOException {
        //创建一个文件
        File file=new File("D:\\WUDownloadCache\\te.txt");
        file.createNewFile();
        //输入流
        FileInputStream fileInputStream=new FileInputStream(file);
        //定义一个接受的变量
int temp;
        try{
            //FileInputStream输入流的读
            while((temp=fileInputStream.read())!=-1){
                //转换成
              char th=(char)temp;
              System.out.print(th);

            }
        }catch (Exception e){
            e.printStackTrace();

        }finally {
            fileInputStream.close();
        }
    }
}
            /*byte[] bytes=new byte[100];
            bytes=new byte[fileInputStream.available()];
            fileInputStream.read(bytes);
            String str=new String(bytes);
            System.out.println(str);*/


